<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('rigthCenterDiv','${ctx}/drug/drugInfo/index?drugDict.drugCode=${drugInfo.drugDict.drugCode}')">药品基本信息列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('rigthCenterDiv','${ctx}/drug/drugInfo/form?drugDict.drugCode=${drugInfo.drugDict.drugCode}')">药品基本信息添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<%--<form:form id="searchForm" modelAttribute="drugInfo"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/drug/drugInfo/index');" method="post" class="form-inline">--%>
                                    <%--<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>--%>
                                    <%--<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>--%>
                                    <%--<label>药品代码 ：</label><form:input path="drugDict.drugCode" htmlEscape="false" maxlength="50" class="form-control" />--%>
                                    <%--&nbsp;&nbsp;<label>药品名称 ：</label><form:input path="drugDict.drugName" htmlEscape="false" maxlength="50" class="form-control" />--%>
                                    <%--<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>--%>

                                <%--</form:form>--%>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered mg-t datatable">
                            <thead>
                                <tr>
                                    <th>药品代码</th>
                                    <th>药品名称</th>
                                    <%--<th>包装数量</th>--%>
                                    <th>包装规格</th>
                                    <th>包装单位</th>
                                    <th>药品厂商</th>
                                    <th>最小单位规格</th>
                                    <th>最小单位</th>
                                    <th>批准文号</th>
                                    <th>是否GMP</th>
                                    <%--<th>价格类型</th>--%>
                                    <%--<th>备注</th>--%>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="drugInfo">
                                <tr>
                                    <td> ${drugInfo.drugDict.drugCode}</td>
                                    <td> ${drugInfo.drugDict.drugName}</td>
                                    <%--<td> ${drugInfo.packageNum}</td>--%>
                                    <td> ${drugInfo.packageSpec}</td>
                                    <td> ${fns:getDictLabels(drugInfo.packageUnit, 'SPEC_UNIT', '')}</td>
                                    <td> ${drugInfo.drugSupplierCata.supplierName}</td>
                                    <td> ${drugInfo.minSpec}</td>
                                    <td> ${fns:getDictLabel(drugInfo.minUnits,'SPEC_UNIT',drugInfo.minUnits)}</td>
                                    <td> ${drugInfo.passNo}</td>
                                    <td> ${fns:getDictLabels(drugInfo.gmp, 'YES_NO', '')}</td>
                                    <%--<td> ${fns:getDictLabels(drugInfo.drugClass, 'TENDER_PRICE_CLASS', '')}</td>--%>
                                 <%--   <td> ${drugInfo.remarks}</td>--%>
                                    <td>
                                        <a href="#" onclick="loadDiv('rigthCenterDiv','${ctx}/drug/drugInfo/form?id=${drugInfo.id}')" class="btn btn-success btn-xs">修改</a>
                                        <a href="#"  class="applyBt btn btn-danger btn-xs" onclick="confirmExtend('确认要删除该药品基本信息吗？',function(){delLoad('rigthCenterDiv','${ctx}/drug/drugInfo/delete?id=${drugInfo.id}','${ctx}/drug/drugInfo/index?drugDict.drugCode=${drugInfo.drugDict.drugCode}')})">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>

                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>